package givenchy

import org.codehaus.groovy.grails.plugins.springsecurity.Secured
@Secured(['ROLE_USER','ROLE_ADMIN'])
class LogsController {
   def authenticateService
   def flushOther = {
        params.max = Math.min(params.max ? params.int('max') : 20, 100)
        params.sort ="createTime"
        params.order = "desc"
        [logsInstanceList: Logs.findAllBySourceId(authenticateService.userDomain().id, params), logsInstanceTotal: Logs.countBySourceId(authenticateService.userDomain().id)]
    }

    def flushMe = {
        params.max = Math.min(params.max ? params.int('max') : 20, 100)
        params.sort ="createTime"
        params.order = "desc"
        [logsInstanceList: Logs.findAllBySiteId(authenticateService.userDomain().id, params), logsInstanceTotal: Logs.countBySiteId(authenticateService.userDomain().id)]
    }
}
